window: set GTK_STYLE_CLASS_TITLEBAR to custom titles
authorCosimo Cecchi <cosimoc@gnome.org>
Fri, 16 Aug 2013 17:26:12 +0000 (19:26 +0200)
committerMatthias Clasen <mclasen@redhat.com>
Sat, 17 Aug 2013 03:12:23 +0000 (23:12 -0400)
When a custom title is added to a GtkWindow, add the
GTK_STYLE_CLASS_TITLEBAR to it, so the theme can apply the default rules
for its style.

https://bugzilla.gnome.org/show_bug.cgi?id=706045

gtk/gtkwindow.c

index 5ea9b1d9f713b0babe3a5888cd44c0bf0ec14812..df0ec26c11edf49f04c9c9ecedde3ba6e27a804d 100644 (file)
@@ -3505,6 +3505,9 @@ gtk_window_set_titlebar (GtkWindow *window,
   if (visual)
     gtk_widget_set_visual (widget, visual);
 
+  gtk_style_context_add_class (gtk_widget_get_style_context (titlebar),
+                               GTK_STYLE_CLASS_TITLEBAR);
+
   gtk_widget_queue_resize (widget);
 }